home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / program / linereq.lha / linereq_library / example / LineReq_Demo.e
Text File  |  1995-11-10  |  1KB  |  47 lines

  1. /*
  2. ** LineReq.Library example.
  3. **
  4. ** (C)Copyright 1995 By Fabio Rotondo.
  5. **
  6. ** Contact me at: fsoft@intercom.it
  7. **
  8. ** This is an AmigaE example program. It should be easily ported in other
  9. ** languages...
  10. **
  11. */
  12.  
  13. MODULE 'libraries/linereq'
  14.  
  15. PROC main()
  16.   /*
  17.   ** Here we open the library
  18.   */
  19.   IF (linereqbase:=OpenLibrary('linereq.library',0))
  20.     Lr_Alloc()            /* Set things up...     */
  21.     IF Lr_SetScreen(NIL)     /* We will use WBScreen */
  22.         IF Lr_ReqString('String Requester',
  23.                     'Insert A string\nAnd try this wonder!',
  24.                     'Wow! What a great lib!', 'Only good things about the lib, please!', 255)
  25.  
  26.             WriteF('You Inserted:\s\n', Lr_GetString())
  27.         ELSE
  28.             WriteF('Requester CANCELLED!\n')
  29.         ENDIF
  30.  
  31.         Lr_SetFont('topaz.font', 11)
  32.         IF Lr_ReqNumber('Number Requester',
  33.                     'Insert how much do you like\nAmiga Computers!\n(percentage)',
  34.                     100, NIL, 3)
  35.           WriteF('You like it \d%!!!\n', Lr_GetValue())
  36.         ELSE
  37.           WriteF('Req CANCELLED!\n')
  38.         ENDIF
  39.     ELSE
  40.       WriteF('Lr_SetScreen failed... no WB?\n')
  41.     ENDIF
  42.     Lr_Dispose()
  43.     CloseLibrary(linereqbase)
  44.   ENDIF
  45. ENDPROC
  46.  
  47.